import { validateSocialCreditCode } from '@/libs/validate'
function validatorSccd (rule, value, callback) {
    value === ''
        ? callback()
        : validateSocialCreditCode(value)
            ? callback()
            : callback(new Error('18位数字或大写字母'))
}
export default {
    sysId: [
        { required: true, message: '此项为必填项', trigger: 'change' }
    ],
    impexpMarkcd: [
        { required: true, message: '此项为必填项', trigger: 'change' }
    ],
    invtType: [
        { required: true, message: '清单类型必填', trigger: 'change' }
    ],
    putrecNo: [
        { required: true, message: '请录入12位编号', trigger: 'blur' },
        { min: 12, max: 12, message: '编号12位字符', trigger: 'blur' }
    ],
    bizopEtpsno: [
        { required: true, message: '请输入10位编码', trigger: 'blur,change' },
        { min: 10, max: 10, message: '编码10位字符', trigger: 'blur,change' }
    ],
    bizopEtpsSccd: [
        { validator: validatorSccd, trigger: 'blur' }
    ],
    rcvgdEtpsno: [
        { required: true, message: '请输入10位编码', trigger: 'blur,change' },
        { min: 10, max: 10, message: '编码10位字符', trigger: 'blur,change' }
    ],
    rvsngdEtpsSccd: [
        { validator: validatorSccd, trigger: 'blur' }
    ],
    dclEtpsno: [
        { required: true, message: '请输入10位编码', trigger: 'change' },
        { min: 10, max: 10, message: '编码10位字符', trigger: 'change' }
    ],
    dclEtpsSccd: [
        { validator: validatorSccd, trigger: 'change' }
    ],
    inputCode: [
        { required: true, message: '请输入10位编码', trigger: 'change' },
        { min: 10, max: 10, message: '编码10位字符', trigger: 'change' }
    ],
    inputTime: [
        { required: true, message: '此项为必填项', trigger: 'blur' }
    ],
    mtpckEndprdMarkcd: [
        { required: true, message: '此项为必填项', trigger: 'change' }
    ],
    supvModecd: [
        { required: true, message: '此项为必填项', trigger: 'change' }
    ],
    trspModecd: [
        { required: true, message: '此项为必填项', trigger: 'change' }
    ],
    impexpPortcd: [
        { required: true, message: '此项为必填项', trigger: 'change' }
    ],
    dclPlcCuscd: [
        { required: true, message: '此项为必填项', trigger: 'change' }
    ],
    stshipTrsarvNatcd: [
        { required: true, message: '此项为必填项', trigger: 'change' }
    ],
    dclcusFlag: [
        { required: true, message: '此项为必填项', trigger: 'change' }
    ],
    corrEntryDclEtpsNo: [
        { min: 10, max: 10, message: '编码10位字符', trigger: 'blur' }
    ],
    corrEntryDclEtpsSccd: [
        { validator: validatorSccd, trigger: 'blur' }
    ],
    rltEntryBizopEtpsno: [
        { min: 10, max: 10, message: '编码10位字符', trigger: 'blur' }
    ],
    rltEntryBizopEtpssccd: [
        { validator: validatorSccd, trigger: 'blur' }
    ],
    rltEntryRcvgdEtpsno: [
        { min: 10, max: 10, message: '编码10位字符', trigger: 'blur' }
    ],
    rltEntryRvsngdEtpsSccd: [
        { validator: validatorSccd, trigger: 'blur' }
    ],
    rltEntryDclEtpsno: [
        { min: 10, max: 10, message: '编码10位字符', trigger: 'blur' }
    ],
    rltEntryDclEtpsSccd: [
        { validator: validatorSccd, trigger: 'blur' }
    ]
}
